package com.example.administrator.managesystem.view;

import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.administrator.managesystem.R;

public class RepostDialog extends Dialog {
    private LinearLayout cancel;
    private ImageView qq,wechat,friend_circle,qq_zone;
    //构造方法
    public RepostDialog(Context context) {

        //设置对话框样式
        super(context, R.style.mdialog);

        //通过LayoutInflater获取布局
        View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_repost, null);
        cancel = view.findViewById(R.id.cancel_ll);    //获取取消按钮
        qq=view.findViewById(R.id.qq);
        wechat=view.findViewById(R.id.wechat);
        qq_zone=view.findViewById(R.id.qq_zone);
        friend_circle=view.findViewById(R.id.friend_circle);
        setContentView(view);  //设置显示的视图
    }


    public void setOnCancelListener(View.OnClickListener listener) {
       cancel.setOnClickListener(listener);
    }

    public void setOnQQListener(View.OnClickListener listener) {

        qq.setOnClickListener(listener);
    }

    public void setOnWechatListener(View.OnClickListener listener) {
        wechat.setOnClickListener(listener);
    }

    public void setOnQQZoneListener(View.OnClickListener listener) {
       qq_zone.setOnClickListener(listener);
    }

    public void setOnFriendCircleListener(View.OnClickListener listener) {
        friend_circle.setOnClickListener(listener);
    }

}
